import { observe } from "../reactive/observe.mjs";
import { Watcher } from "../reactive/watcher.mjs";

const obj = { a: { b: 1 } }

observe(obj);

new Watcher(obj, 'a.b', (newVal, oldVal) => {
    console.log('watched', newVal, oldVal)
})

obj.a.b = 2;

obj.a = { b: 3 }

obj.a.b = 4;